Sound Modular Verification of C Code Executing in an Unverified Context Extended Version

نویسندگان

  • Pieter Agten
  • Bart Jacobs
  • Frank Piessens
  • KU Leuven
چکیده

Over the past decade, great progress has been made in the static modular verification of C code by means of separation logic-based program logics. However, the runtime guarantees offered by such verification are relatively limited when the verified modules are part of a whole program that also contains unverified modules. In particular, a memory safety error in an unverified module can corrupt the runtime state, leading to assertion failures or invalid memory accesses in the verified modules. This paper develops runtime checks to be inserted at the boundary between the verified and the unverified part of a program, to guarantee that no assertion failures or invalid memory accesses can occur at runtime in any verified module. One of the key challenges is enforcing the separation logic frame rule, which we achieve by checking the integrity of the footprint of the verified part of the program on each control flow transition from the unverified to the verified part. This in turn requires the presence of some support for module-private memory at runtime. We formalize our approach and prove soundness. We implement the necessary runtime checks by means of a program transformation that translates C code with separation logic annotations into plain C, and that relies on a protected module architecture for providing module-private memory and restricted module entry points. Benchmarks show the performance impact of this transformation depends on the choice of boundary between the verified and unverified parts of the program, but is below 4% for real-world applications.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Fixed point theorem for non-self mappings and its applications in the modular ‎space

‎In this paper, based on [A. Razani, V. Rako$check{c}$evi$acute{c}$ and Z. Goodarzi, Nonself mappings in modular spaces and common fixed point theorems, Cent. Eur. J. Math. 2 (2010) 357-366.] a fixed point theorem for non-self contraction mapping $T$ in the modular space $X_rho$ is presented. Moreover, we study a new version of Krasnoseleskii's fixed point theorem for $S+T$, where $T$ is a cont...

متن کامل

Sound Symbolic Linking in the Presence of Preprocessing

Formal verification enables developers to provide safety and security guarantees about their code. A modular verification approach supports the verification of different pieces of an application in separation. We propose symbolic linking as such a modular approach, since it allows to decide whether or not earlier verified source files can be safely linked together (i.e. earlier proven propertie...

متن کامل

$C$-class functions on common fixed point theorems for weak‎ ‎contraction mapping of integral type in modular spaces

‎In this paper‎, ‎we use the concept of $C$-class functions introduced‎ ‎by Ansari [4] to prove the existence and uniqueness of‎ ‎common fixed point for self-mappings in modular spaces of integral‎ ‎inequality‎. ‎Our results extended and generalized previous known‎ ‎results in this direction‎.

متن کامل

Using XCAP to Certify Realistic Systems Code: Machine Context Management

Formal, modular, and mechanized verification of realistic systems code is desirable but challenging. Verification of machine context management (a basis of multi-tasking) is one representative example. With context operations occurring hundreds to thousands of times per second on every computer, their correctness deserves careful examination. Given the small and stable code bases, it is a commo...

متن کامل

Certificates and Separation Logic

Modular and local reasoning about object-oriented programs has been widely studied for programing languages such as C# and Java. Once source programs have been proven, the next verification challenge is to ensure that the code produced by the compiler is correct. Since verifying a compiler can be extremely complex, this paper uses proof-transforming compilation, an alternative approach which au...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2014